<template>
  <div class="app-container defect-question">
    <info-page-container>
      <template slot="body" v-if="inspectInfo != null">
        <component :inspectInfo="inspectInfo" :instanceNo="instanceNo" :nodeSerialNo="nodeSerialNo" :currentPageName="currentPage" :handelCode="handelCode"
                   :is="currentPage"></component>
      </template>
    </info-page-container>
  </div>

</template>

<script>
import {inspectMixins} from "@/views/securityCheck/mixins/inspectMixins";
import InspectInfo from "@/views/securityCheck/defectQuestion/components/inspectInfo.vue";
import HiddenDangerShowPage from "@/views/securityCheck/defectQuestion/infoPage/subPage/HiddenDangerShowPage.vue";
import {
  INFO_PAGE_CONFIG,
  INFO_PAGE_NAME,
} from "@/views/securityCheck/defectQuestion/infoPage/confo";

export default {
  mixins: [inspectMixins],
  name: "defectQuestion_info",
  components: {
    InspectInfo,
    HiddenDangerShowPage
  },
  data() {
    return {
      currentPage: INFO_PAGE_NAME.HiddenDangerShowPage,
      pageConfig: INFO_PAGE_CONFIG,
    }
  },
  created() {
    const listPageName = this.$route.query?.listPageName != null && this.$route.query?.listPageName !== '' ? this.$route.query.listPageName : null;
    let {pageConfig} = this
    let currentItem = pageConfig.find(item => item.listPageName == listPageName)
    this.currentPage = currentItem != null ? currentItem.infoPage : ''
  }
}
</script>

<style lang="scss" scoped>

</style>
